/* eslint-disable no-unreachable,no-unused-vars,no-undef */

// 获取access-token
export function getAccessToken() {
  return Utils.cookie.readCookie('access-token')
}

// 获取user-token
export function getUserToken() {
  // 进行RSA加密
  // if (window.Settings.publicKey) {
  //   let userToken = Constants.userToken
  //   let encrypt = new window.JSEncrypt()
  //   encrypt.setPublicKey(window.Settings.publicKey)
  //   let rsa = encrypt.encrypt(userToken)
  //   console.log('rsa token is: ' + rsa)
  // } else {
  //   console.log('rsa public key is null!!!')
  // }
  // return encrypt.encrypt(userToken)
  // MD5加密
  // console.log('MD5 is: ' + MD5(Constants.userToken))
  const base64Code = Base64.encode(Constants.userToken)
  return base64Code
}
